-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(transform): convert to csl_stencil.apply #2803
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2803 +/- ##
==========================================
+ Coverage 89.79% 89.84% +0.04%
==========================================
Files 394 397 +3
Lines 48747 49342 +595
Branches 7471 7592 +121
==========================================
+ Hits 43774 44332 +558
- Misses 3793 3815 +22
- Partials 1180 1195 +15 ☔ View full report in Codecov by Sentry. |
AntonLydike
reviewed
Jul 2, 2024
AntonLydike
reviewed
Jul 2, 2024
dk949
reviewed
Jul 2, 2024
Co-authored-by: Anton Lydike <[email protected]>
AntonLydike
approved these changes
Jul 4, 2024
n-io
added a commit
that referenced
this pull request
Jul 26, 2024
Adds a canonicalisation pass for `csl_stencil.apply`. The op takes an empty tensor as`iter_arg`, which it does not manage itself. The conversion pass in #2803 initialises an `iter_arg` for each instance of `apply`. This canonicalisation pass identifies where this can be re-used, effectively removing redundant allocations. --------- Co-authored-by: n-io <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the conversion to csl_stencil.apply op as outlined in Step 2 of #2747
The
csl_stencil.apply
op combines a csl_stencil.prefetch (symmetric buffer communication across a given stencil shape) with a stencil.apply.The transformation consists of several steps:
stencil.apply
, select thecsl_stencil.prefetch
with the biggest memory overhead (if several are present) to be fused with the apply op into acsl_stencil.apply
(a+b)+c -> (c+a)+b
to access, consume, and reduce data of neighbours (for input stencil only)tensor.InsertSliceOp
to insert computed chunk into returned z-value tensor